function num = str2compnum(strNum)
    num = str2double(strNum);
    if ~isnan(num)
        return;
    else
        exps = ['p', 'n', 'u', 'm', 'k', 'K', 'M'];
        multPos = [];
        for k = 1:length(exps)
            multPosAux = find(strNum == exps(k));
            if numel(multPosAux)
                if (numel(multPosAux) == 1) && isempty(multPos)
                    multPos = multPosAux;
                    switch exps(k)
                        case 'p'
                            mult = 1e-12;
                        case 'n'
                            mult = 1e-9;
                        case 'u'
                            mult = 1e-6;
                        case 'm'
                            mult = 1e-3;
                        case {'k', 'K'}
                            mult = 1e3;
                        case 'M'
                            mult = 1e6;
                    end
                else
                    num = NaN;
                    return;
                end
            end
        end
        if ~isempty(multPos) && (sum(strNum == '.') <= 1)
            if multPos > 1
                num1 = str2double(strNum(1:multPos-1));
            else
                num1 = 1;
            end
            if multPos < length(strNum)
                num2 = str2double(strNum(multPos+1:end))*10^(-length(strNum(multPos+1:end)));
            else
                num2 = 0;
            end
            num = (num1 + num2)*mult;
        else
            num = NaN;
        end
    end
end